﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/admin/AdminMaster.master" ValidateRequest="false" CodeFile="WZinfo.aspx.cs" Inherits="admin_WZinfo" %>

<%@ Register Assembly="DotNetTextBox" Namespace="DotNetTextBox" TagPrefix="DNTB" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="AdminRight">
    <asp:Label ID="Label1" runat="server"></asp:Label>
    <div class="rightHeader1">
        <div class="rightHLeft"><span class="rightHeaderTitle">当前位置</span></div>
        <div class="rightHMiddle2">
            <span>
                <a href="Default.aspx" class="moreRight" style="float: left;">首页</a> <span class="jian">></span>
                <a href="WZinfo.aspx" class="moreRight" style="float: left;">添加友情链接</a>
            </span>
        </div>
        <div class="rightHRight"></div>
    </div>
    <div style="margin-top: 10px; border: 1px solid #dddddd; width: 766px;">
        <table style="width: 760px;">
            <tr>
                <td style="width: 100px; height: 26px; text-align: right">网站名称：</td>
                <td style="height: 26px;width:200px;text-align: left;"">
                    <asp:TextBox ID="TextBox1" runat="server" Width="190px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="height: 26px; text-align: right;">链接地址：</td>
                <td style="text-align: left;">
                    <asp:TextBox ID="TextBox2" runat="server" Width="190px"></asp:TextBox></td>
                <td style="text-align: left;">
                    <asp:Button ID="Button2" runat="server" Height="30px" Width="60px" BackColor="#159fde" ForeColor="White" OnClick="Button2_Click" Text="添 加" />
                </td>
            </tr>
            <tr>
                <td colspan="3" style="text-align: center">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2"
                        BackColor="White" BorderColor="#fff" ForeColor="#333333" CellPadding="4"
                        Width="760px" DataKeyNames="yid"  GridLines="none">
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:BoundField DataField="yid" HeaderText="编号" SortExpression="yid" />
                            <asp:BoundField DataField="yname" HeaderText="网站名称" SortExpression="yname" />
                            <asp:BoundField DataField="ylink" HeaderText="网站网址" SortExpression="ylink" />
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                        OnClientClick='return window.confirm("确认删除")' Text="删除"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerStyle BackColor="#159fde" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#159fde" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
                        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [qinglink]" DeleteCommand="delete from qinglink where yid=@yid">
                        <DeleteParameters>
                            <asp:Parameter Name="yid" Type="Int32" />
                        </DeleteParameters>
                    </asp:SqlDataSource>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
